﻿using ASoft.Base;
using ASoft.Web.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Asoft.Web.Controllers
{
    public class ServiceController : Controller
    {
        [HttpPost]
        public ActionResult Upload(WebRoomData entity)
        {
            if (entity != null && entity.Id > 0)
                this.GetRepository().Insert(entity);
            return Content("OK");
        }

        [HttpPost]
        public ActionResult UploadWS(WeatherStationData entity)
        {
            if (entity != null)
                this.GetRepository().Insert(entity);
            return Content("OK");
        }

        WebRoomDataRepository GetRepository()
        {
            return new WebRoomDataRepository();
        }
    }
}
